﻿package game.network {
	import flash.events.Event;
	
	public class NetworkEvent extends Event {
		
		public static const COMPLETE:String			= "network.complete";
		public static const INIT:String				= "network.init";
		public static const ERROR:String			= "network.error";
		public static const OAUTH_ERROR:String		= "oauth.error";
		public static const OAUTH_SUCCESS:String	= "oauth.success";
		public static const OAUTH_LOCCHANGE:String	= "locationChange";
		public static const GET_TOKEN:String		= "get.token";
		
		public var data:Object;
		
		public function NetworkEvent($type:String, data:Object = null, $bubbles:Boolean = false, $cancelable:Boolean = false) {
			super($type, $bubbles, $cancelable);
			this.data = data;
		}

		public override function toString():String {
			return formatToString("NetworkEvent", "data", "type", "bubbles", "cancelable");
		}

	}
}